package top.fzqblog.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import butterknife.ButterKnife;
import butterknife.OnClick;
import top.fzqblog.firstapp.R;

/**
 * Created by 抽离 on 2017/9/15 0015.
 */

public class TitleFragment extends Fragment {

    @OnClick(R.id.titleImageView)
    public void onHomeClick(){
        Log.i("tag", "点击了主页：" + getActivity().getLocalClassName());
        Toast.makeText(getActivity(), "点击了主页：" + getActivity().getLocalClassName(), Toast.LENGTH_SHORT).show();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.titlebar, container, false);
        ButterKnife.bind(this, view);
        return view;
    }
}
